Demo - Results of a Simulation Run
In the previous section we ran an EnergyPlus simulation using the runsim function.
1>>> from eprun import runsim
2>>> result=runsim(ep_dir=r'C:\EnergyPlusV9-6-0',
3>>> input_filepath='1ZoneUncontrolled.idf',
4>>> epw_filepath='USA_CO_Golden-NREL.724666_TMY3.epw',
5>>> sim_dir='simulation_results')
6>>> print(type(result))
7<class 'eprun.epresult.EPResult'>
This returns a EPResult object instance.
We can check if the simulation run was successful - i.e. EnergyPlus ran and generated results files -
by looking at the returncode property of the EPResult object.
This is a copy of the returncode of the subprocess.run method
where 0 means success and 1 means failure.
8>>> print(epresult.returncode)
90
The stdout property of the EPResult object stores a copy of the
stdout of the subprocess.run method.
This is the text generated by the call which would appear if the call was run on the Command Prompt.
10>>> print(epresult.stdout)
11EnergyPlus Starting
12EnergyPlus, Version 9.6.0-f420c06a69, YMD=2022.03.09 06:09
13Adjusting Air System Sizing
14Adjusting Standard 62.1 Ventilation Sizing
15Initializing Simulation
16Reporting Surfaces
17Beginning Primary Simulation
18Initializing New Environment Parameters
19Warming up {1}
20Warming up {2}
21Warming up {3}
22Warming up {4}
23Warming up {5}
24Warming up {6}
25Warming up {7}
26Warming up {8}
27Warming up {9}
28Warming up {10}
29Warming up {11}
30Warming up {12}
31Warming up {13}
32Warming up {14}
33Warming up {15}
34Warming up {16}
35Warming up {17}
36Warming up {18}
37Warming up {19}
38Warming up {20}
39Warming up {21}
40Warming up {22}
41Starting Simulation at 12/21 for DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB
42Initializing New Environment Parameters
43Warming up {1}
44Warming up {2}
45Warming up {3}
46Warming up {4}
47Warming up {5}
48Warming up {6}
49Warming up {7}
50Warming up {8}
51Warming up {9}
52Warming up {10}
53Warming up {11}
54Warming up {12}
55Warming up {13}
56Warming up {14}
57Warming up {15}
58Warming up {16}
59Starting Simulation at 07/21 for DENVER CENTENNIAL GOLDEN N ANN CLG 1% CONDNS DB=>MWB
60Initializing New Environment Parameters
61Warming up {1}
62Warming up {2}
63Warming up {3}
64Warming up {4}
65Warming up {5}
66Warming up {6}
67Warming up {7}
68Warming up {8}
69Warming up {9}
70Warming up {10}
71Warming up {11}
72Warming up {12}
73Warming up {13}
74Warming up {14}
75Warming up {15}
76Warming up {16}
77Warming up {17}
78Warming up {18}
79Warming up {19}
80Warming up {20}
81Starting Simulation at 01/01/2013 for RUN PERIOD 1
82Updating Shadowing Calculations, Start Date=01/21/2013
83Continuing Simulation at 01/21/2013 for RUN PERIOD 1
84Updating Shadowing Calculations, Start Date=02/10/2013
85Continuing Simulation at 02/10/2013 for RUN PERIOD 1
86Updating Shadowing Calculations, Start Date=03/02/2013
87Continuing Simulation at 03/02/2013 for RUN PERIOD 1
88Updating Shadowing Calculations, Start Date=03/22/2013
89Continuing Simulation at 03/22/2013 for RUN PERIOD 1
90Updating Shadowing Calculations, Start Date=04/11/2013
91Continuing Simulation at 04/11/2013 for RUN PERIOD 1
92Updating Shadowing Calculations, Start Date=05/01/2013
93Continuing Simulation at 05/01/2013 for RUN PERIOD 1
94Updating Shadowing Calculations, Start Date=05/21/2013
95Continuing Simulation at 05/21/2013 for RUN PERIOD 1
96Updating Shadowing Calculations, Start Date=06/10/2013
97Continuing Simulation at 06/10/2013 for RUN PERIOD 1
98Updating Shadowing Calculations, Start Date=06/30/2013
99Continuing Simulation at 06/30/2013 for RUN PERIOD 1
100Updating Shadowing Calculations, Start Date=07/20/2013
101Continuing Simulation at 07/20/2013 for RUN PERIOD 1
102Updating Shadowing Calculations, Start Date=08/09/2013
103Continuing Simulation at 08/09/2013 for RUN PERIOD 1
104Updating Shadowing Calculations, Start Date=08/29/2013
105Continuing Simulation at 08/29/2013 for RUN PERIOD 1
106Updating Shadowing Calculations, Start Date=09/18/2013
107Continuing Simulation at 09/18/2013 for RUN PERIOD 1
108Updating Shadowing Calculations, Start Date=10/08/2013
109Continuing Simulation at 10/08/2013 for RUN PERIOD 1
110Updating Shadowing Calculations, Start Date=10/28/2013
111Continuing Simulation at 10/28/2013 for RUN PERIOD 1
112Updating Shadowing Calculations, Start Date=11/17/2013
113Continuing Simulation at 11/17/2013 for RUN PERIOD 1
114Updating Shadowing Calculations, Start Date=12/07/2013
115Continuing Simulation at 12/07/2013 for RUN PERIOD 1
116Updating Shadowing Calculations, Start Date=12/27/2013
117Continuing Simulation at 12/27/2013 for RUN PERIOD 1
118Writing tabular output file results using comma format.
119Writing tabular output file results using tab format.
120Writing tabular output file results using text format.
121Writing tabular output file results using HTML format.
122Writing tabular output file results using XML format.
123EnergyPlus Run Time=00hr 00min 0.65sec
The EPResult object also contains the filepaths of all the results files generated by a successful EnergyPlus run.
These files are stored in the designated simulation directory and are accessed using the files property.
124>>> print(epresult.files)
125{'audit': 'C:\\simulation_results\\eplusout.audit',
126 'bnd': 'C:\\simulation_results\\eplusout.bnd',
127 'dxf': 'C:\\simulation_results\\eplusout.dxf',
128 'eio': 'C:\\simulation_results\\eplusout.eio',
129 'end': 'C:\\simulation_results\\eplusout.end',
130 'err': 'C:\\simulation_results\\eplusout.err',
131 'eso': 'C:\\simulation_results\\eplusout.eso',
132 'mdd': 'C:\\simulation_results\\eplusout.mdd',
133 'mtd': 'C:\\simulation_results\\eplusout.mtd',
134 'mtr': 'C:\\simulation_results\\eplusout.mtr',
135 'rdd': 'C:\\simulation_results\\eplusout.rdd',
136 'shd': 'C:\\simulation_results\\eplusout.shd',
137 'csv': 'C:\\simulation_results\\eplustbl.csv',
138 'htm': 'C:\\simulation_results\\eplustbl.htm',
139 'tab': 'C:\\simulation_results\\eplustbl.tab',
140 'txt': 'C:\\simulation_results\\eplustbl.txt',
141 'xml': 'C:\\simulation_results\\eplustbl.xml'}
These files contain the results of the EnergyPlus simulation. How to view the contents of these files is described in the next section.
Further resources
The documentation for the EPResult class
The ‘Running an EnergyPlus simulation on the 1ZoneUncontrolled file’ Jupyter Notebook shows the eprun function in action.
The EnergyPlus QuickStart guide: https://energyplus.net/quickstart
The ‘Running EnergyPlus: Command Line’ section on p15 in the EnergyPlus Essentials documentation.